home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / PowerPC / vbcc / doc / vlink.doc < prev    next >
Text File  |  1998-08-02  |  7KB  |  171 lines

  1. vlink V0.5        VBCC ANSI C Compiler Reference Manual           vlink V0.5
  2.  
  3. NAME
  4.      vlink - linker for multiple file formats
  5.  
  6. SYNOPSIS
  7.      vlink [-dhrstvwxMRSX] [-B linkmode] [-b targetname] [-baseoff offset]
  8.            [-F filename] [-L library-search-path] [-l library-specifier]
  9.            [-multibase] [-nostdlib] [-o filename] [-sc] [-sd] [-V version]
  10.            [-y symbol] input-files...
  11.  
  12. DESCRIPTION
  13.      vlink combines the object and archive files given on the command line
  14.      into a new object file. The output object file is either an executable
  15.      program, a shared object suitable for loading at run-time, or an
  16.      object file that can once again be processed by vlink. Object files
  17.      and archives are processed in the order given on the command line.
  18.  
  19.      The file format of an input object file is determined automatically
  20.      by vlink. The default output file format is compiled in (see -v)
  21.      and may be changed by -b.
  22.  
  23.      Supported file formats:
  24.  
  25.      amigaos
  26.              The AmigaDos hunk format for M68k. Requires AmigaOS 2.04.
  27.              No shared objects.
  28.      amigaehf
  29.              An extension of the AmigaDOS hunk format for the PowerPC,
  30.              32-bit, big endian, as introduced by Haage&Partner GmbH. No
  31.              executables (they are in amigaos format) or shared objects.
  32.      elf32ppcbe
  33.              ELF (executable linkable format) for PowerPC, 32-bit,
  34.              big endian.
  35.  
  36.      The options are as follows:
  37.  
  38.      -Bdynamic
  39.              Specifies that linking against dynamic libraries can take
  40.              place. If a library specifier of the form -lx appears on
  41.              the command line, ld searches for a library of the from
  42.              libx.so.n.m (see the -l option) according to the search
  43.              rules in effect. If such a file can not be found a tradi-
  44.              tional archive is looked for. This options can appear
  45.              anywhere on the command line and is complementary to -Bstatic.
  46.  
  47.      -Bstatic
  48.              The counterpart of -Bdynamic. This option turns off dynamic
  49.              linking for all library specifiers until a -Bdynamic is once
  50.              again given. Any explicitly mentioned shared object encoun-
  51.              tered on the command line while this option is in effect is
  52.              flagged as an error.
  53.  
  54.      -Bshareable
  55.              Instructs the linker to build a shared object from the object
  56.              files rather than a normal executable image.
  57.  
  58.      -Bsymbolic
  59.              This option causes all symbolic references in the output to be
  60.              resolved in this link-edit session. The only remaining run-
  61.              time relocation requirements are base-relative relocations,
  62.              ie. translation with respect to the load address. Failure to
  63.              resolve any symbolic reference causes an error to be reported.
  64.  
  65.      -Bforcearchive
  66.              Force all members of archives to be loaded, whether or not such
  67.              members contribute a definition to any plain object files.
  68.              Useful for making a shared library from an archive of PIC
  69.              objects without having to unpack the archive.
  70.  
  71.      -b targetname
  72.              Specifies target file format for the output file. See
  73.              also "Supported file formats".
  74.  
  75.      -baseoff offset
  76.              Defines section offset for base-relative relocations. The
  77.              offset defaults to 0x8000.
  78.              NOTE: AmigaOS/68k usually requires a 0x7ffe offset in small
  79.              data mode.
  80.  
  81.      -dc     Force allocation of commons even when producing relocatable
  82.              output.
  83.  
  84.      -dn     Same as: -Bstatic
  85.  
  86.      -dy     Same as: -Bdynamic
  87.  
  88.      -F filename
  89.              A list of object file names is read from the specified file.
  90.              Useful, if the number of objects exceed the length of the
  91.              command line.
  92.  
  93.      -h      Prints a short help text.
  94.  
  95.      -L library-search-path
  96.              Add path to the list of directories to search for libraries
  97.              specified with the -l option. When a default search path
  98.              was compiled in (see -v), then it is searched last.
  99.  
  100.      -l library-specifier
  101.              This option specifies a library to be considered for inclusion
  102.              in the output. If the -Bdynamic option is in effect, a shared
  103.              library of the form lib<spec>.so.m.n (where m is the major,
  104.              and n is the minor version number, respectively) is searched
  105.              for first. The library with the highest version found in the
  106.              search path is selected. If no shared library is found or
  107.              the -Bstatic option is in effect, an archive of the form
  108.              lib<spec>.a is looked for in the library search path.
  109.              For amigaos/amigaehf file formats, the libraries are called
  110.  
  111.      -M      Produce output about the mapping of segments of the input
  112.              files and the values assigned to symbols in the output file.
  113.  
  114.      -multibase
  115.              The default behaviour of vlink is to merge all sections
  116.              which are accessed base-relative. This guarantees a single
  117.              small data section, which can be accessed through a base
  118.              register.
  119.              If this is not desired - maybe you have several base re-
  120.              gisters and small data sections - you can disable this
  121.              behavoiur by specifying -multibase. 
  122.  
  123.      -nostdlib
  124.              Ignore default library search path, if one was compiled in.
  125.  
  126.      -o filename
  127.              Specifies the name of the output file. Defaults to "a.out".
  128.  
  129.      -R      If the target file format supports it, use the short
  130.              format for relocations.
  131.  
  132.      -r      Produce relocatable object file, suitable for another
  133.              linker pass.
  134.  
  135.      -S      Strip all debugger symbols from the output.
  136.  
  137.      -s      Strip all symbols from the output.
  138.  
  139.      -sc     Merge all code sections to a single code section.
  140.  
  141.      -sd     Merge all data and bss sections to a single data-bss section.
  142.  
  143.      -t      Trace the linker's file accesses.
  144.  
  145.      -V version
  146.              Minimum major version of shared object to be linked.
  147.  
  148.      -v      Prints vlink version string, default library search path
  149.              and implemented target file formats.
  150.  
  151.      -w      Suppress all warning messages.
  152.  
  153.      -X      Discard local symbols in the input files that start with the
  154.              letter "L" or with a dot.
  155.  
  156.      -x      Discard all local symbols in the input files.
  157.  
  158.      -y symbol
  159.              Trace the manipulations inflicted on symbol.
  160.  
  161. BUGS
  162.      Target elf32ppcbe currently doesn't support shared objects and
  163.      executables.
  164.      The following options are not really supported: -B, -d, -S, -X.
  165.      Option -R is untested and should be avoided.
  166.      Real debugger support (source level debugging, etc.) is still
  167.      missing for all target file formats.
  168.  
  169.  
  170. Frank Wille                  28-Jun-1998                frank@phoenix.owl.de
  171.